
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>运营报告</title>
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1.0" />
    <meta name="format-detection" content="telephone=no, email=no" />
    <link rel="stylesheet" href="../css/common.css" />
    <link rel="stylesheet" type="text/css" href="../css/invest.css"/>
</head>
<body class="reportrun_body">
<section id="sp_common_header" class="sp_common_title" style="display: none;">
    <a href="javascript:history.go(-1)">
        <i class="icon"></i>
    </a>
    <span>运营报告</span>
</section>
<ul class="report_detail">
    <!--<li>
        <a href="">
            <img src="../img/report7.png"/>
        </a>
    </li>
    <li>
        <a href="">
            <img src="../img/report6.png"/>
        </a>
    </li>
    <li>
        <a href="">
            <img src="../img/report5.png"/>
        </a>
    </li>
    <li>
        <a href="">
            <img src="../img/report4.png"/>
        </a>
    </li>-->
</ul>
<div class="nodata">
    无更多数据
</div>
<div class="loadmore_btn">
    <img src="../img/load_more.png"/>
</div>
</body>
<script src="../lib/js/jquery-2.1.4.js" type="text/javascript" charset="utf-8"></script>
<script src="../js/wapframwork.js" type="text/javascript" charset="utf-8"></script>
<script src="../lib/js/jquery.base64.js" type="text/javascript" charset="utf-8"></script>
<script src="../lib/js/RainbowBridge.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
    //定义一个全局变量来记录加载更多
    setTitle(".sp_common_title", {'title':'运营报告',"theme":"0"});
    var loadmoreflag = 1;
    $.ajax({
        type: "GET",
        url: getAPIURL() + "home/getlinkmangerbytype?type=R&num=4&time="+new Date().getTime(),
        dataType: "json",
        success: function (data) {
            if(data.length<4){
                $(".loadmore_btn").hide();
                $(".nodata").show();
            }else{
                loadmoreflag++;
            }
            var str = "";
            for(var i = 0;i < data.length;i++){
                str += "<li><a href='"+data[i].url+"'>";
                str += "<img src='"+data[i].pic+"'/>";
            }
            $(".report_detail").html(str);
        }
    });
    $(".loadmore_btn").click(function(){
        loadmore();
    });
    function loadmore(){
        $.ajax({
            type: "GET",
            url: getAPIURL() + "home/getlinkmangerbytype?type=R&num="+4*loadmoreflag+"&time="+new Date().getTime(),
            dataType: "json",
            success: function (data) {
                if(data.length<4*loadmoreflag){
                    $(".loadmore_btn").hide();
                    $(".nodata").show();
                }else{
                    loadmoreflag++;
                }
                var str = "";
                for(var i = 0;i < data.length;i++){
                    str += "<li><a href='"+data[i].url+"'>";
                    str += "<img src='"+data[i].pic+"'/>";
                }
                $(".report_detail").html(str);
            }
        });
    }
</script>
</html>
